package com.sooth.micro.model.table;

import com.dream.system.annotation.Column;
import com.dream.system.annotation.Id;
import com.dream.system.annotation.Table;
import lombok.Data;

import java.sql.Types;

/**
 * @Description: 关联实体模型
 * @Author: moxa
 * @Date: 2023-12-03 17:41:56
 */
@Data
@Table("micro_model")
public class MicroModel {


    /**
     * id
     */
    @Id
    @Column(value = "id", jdbcType = Types.BIGINT)
    private Long id;

    /**
     * 租户编号
     */
    @Column(value = "tenant_id", jdbcType = Types.VARCHAR)
    private String tenantId;

    /**
     * 应用编号
     */
    @Column(value = "app_id", jdbcType = Types.BIGINT)
    private Long appId;

    /**
     * 关联实体
     */
    @Column(value = "join_entity_id", jdbcType = Types.BIGINT)
    private Long joinEntityId;

    /**
     * 关联实体字段
     */
    @Column(value = "join_entity_field", jdbcType = Types.VARCHAR)
    private String joinEntityField;

    /**
     * 实体字段
     */
    @Column(value = "entity_field", jdbcType = Types.VARCHAR)
    private String entityField;

    /**
     * 是否左关联 0：否 1：是
     */
    @Column(value = "left_join", jdbcType = Types.INTEGER)
    private Integer leftJoin;
}
